package br.com.fiap.ConnectionFactory;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.DriverManager;

public class ConnectionFactory {
    public static Connection getConnection() throws SQLException, ClassNotFoundException
    {
        Class.forName("com.mysql.jdbc.Driver");
        return(DriverManager.getConnection("jdbc:mysql://localhost/banco","root","root"));
    }
    public static void endConnection(Connection conn) throws SQLException
    {
    		conn.close();
    }
}